﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using ASoft.Msg;

namespace ASoft.Data
{
    [DataContract]
    [MsgVM]
    public class PLCData
    {
        public PLCData()
        {
            this.PortName = "COM1";
        }
        /// <summary>
        /// 串口名称
        /// </summary>
        [DataMember]
        [MsgVM]
        public string PortName { get; set; }

        /// <summary>
        /// 串口超时毫秒数
        /// </summary>
        [DataMember]
        [MsgVM]
        public int SerialOvertime { get; set; }

        /// <summary>
        /// 检测数据包标识头
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsCheckSerialHead { get; set; }

        /// <summary>
        /// 检测数据包Id
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsCheckSerialId { get; set; }

        /// <summary>
        /// 检测数据包长度
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsCheckSerialLength { get; set; }

        /// <summary>
        /// 检测数据包校验位
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsCheckSerialBit { get; set; }

        /// <summary>
        /// 检测数据包通讯状态位
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsCheckSerialStatus { get; set; }

        /// <summary>
        /// 随系统启动自动运行
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsAutoRunByWindow { get; set; }

        /// <summary>
        /// 自动打开串口
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsAutoOpenSerial { get; set; }

        /// <summary>
        /// 自动进入监控
        /// </summary>
        [DataMember]
        [MsgVM]
        public bool IsAutoMonitor { get; set; }
    }
}
